import 'animate.css'

import './assets/main.scss'

import setupPlugins from "@/plugins";


import { createApp, h } from 'vue'
import { createPinia } from 'pinia'


// import '@/styles/element/index.scss'
// import ElementPlus from 'element-plus'
import 'element-plus/theme-chalk/dark/css-vars.css'
import '@/styles/element/dark/css-vars.scss'

// import '@/styles/element/dark/index.scss'
// 只想导入scss？
// import 'element-plus/theme-chalk/src/dark/css-vars.scss'


import App from './App.vue'
import router from './router'
// 引入组件
import StuDemo2 from "@/views/study1/StuDemo2.vue";


const vs = import.meta.env.VITE_BASE_PATH
console.log(vs);



const app = createApp(App)


// 定义全局组件 MyComponent
// 注册全局组件
app.component('MyComponent3', {
  name: 'MyComponent3',
  // 自定义渲染函数
  render(): any {
    // 调用 setup() 中返回的渲染函数
    return h('div', [
      h('h1', '通过vue的h函数自定义渲染'),
      h('p', 'This content is rendered using a render function in setup()'),
      h('button', { onClick: () => alert('Button clicked!') }, '点我')
    ])
  }
}).component('StuDemo2', StuDemo2)



app.use(createPinia())
app.use(router)
app.use(setupPlugins);

// app.use(ElementPlus)


app.mount('#app')
